<template>
  <div>
    <Title>列表-{{ list.title }}</Title>
    <h2>{{ list.title }}</h2>
    <h3>{{ list.description }}</h3>
    <a-button type="primary" @click="router.replace('/list')">返回</a-button>
  </div>
</template>

<script setup lang="ts">
import { useBookStore } from '@/stores/useBookStore'

const route = useRoute()
const router = useRouter()
const bookStore = useBookStore()
const list = bookStore.bookList.find(item => item.id === +route.params.id)
</script>
